import request from '../../utils/request';
import qs from "qs"
/**
 * 上传一组路线资源
 * @param {*} project 
 */
export function uploadGroupRoads(params) {
    return request('/design/roadline/add', {
        method: 'post',
        data: params
    });
}
/**
 * 修改路线
 * @param {*} project 
 */
export function updateRoad(params) {
    return request('/design/roadline/update', {
        method: 'post',
        data: params
    });
}
/**
 * 删除路线资源
 * @param {*} project 
 */
export function deleteRoad(params) {
    return request('/design/roadline/delete', {
        method: 'get',
        params,
        paramsSerializer: function (params) {
            return qs.stringify(params,{arrayFormat: 'repeat'})
        }
    });
}
/**
 * 查询项目所有路线资源
 * @param {*} param0 
 */
export function queryProjectRoads(params) {
    return request('/design/roadline/list', {
        method: 'post',
        data: params
    });
}

/**
 * 向项目添加引用路线资源(并自动计算)
 * @param {*} value 
 */
export function addRefGroupRoad(params) {
    return request('/design/roadline/ref', {
        method: 'get',
        params,
        paramsSerializer: function (params) {
            return qs.stringify(params, { indices: false })
        }
    });
}

/**
 * 
 * @param {*} param0 
 */
export function queryProjectRefRoads(params) {
    return request('/design/roadline/list', {
        method: 'post',
        data: params
    });
}
export function queryRoadDetail(params) {
    return request('/design/roadlineData/list', {
        method: 'post',
        data: params
    });
}
export function queryRoadDetail2(params) {//标高
    return request('/design/roadlineCg/list', {
        method: 'post',
        data: params
    });
}

/**
 * 线路原始数据
 */
export function RoadlineOriginData(params){
    return request('/design/RoadlineOriginData/list', {
        method: 'post',
        data: params
    });
}

